package com.sinosoft.brokerchannel.base.dao.impl;

import java.util.Map;

import com.sinosoft.brokerchannel.base.utile.BaseCacheWorker;
import com.sinosoft.brokerchannel.base.utile.ToolUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.sinosoft.brokerchannel.base.bins.BasInterfaceSet;
import com.sinosoft.brokerchannel.base.dao.BasInterfaceSetDao;

/**   
  *  
  * 需求名称:非车理赔渠道平台
  * 类描述:[从缓存中查询渠道配置信息]
  * @author shilk
  * 创建时间:[2017年10月9日 下午6:20:06]
  * 版本:[v1.0]
  */
@Component
public class BasInterfaceSetDaoImpl extends BaseCacheWorker<String, BasInterfaceSet> {
	/** mybatis 查询渠道配置信息 **/
	@Autowired
	private BasInterfaceSetDao basInterfaceSetDao;

	/**
	 * key = channelCode + _ + interfaceCode
	 */

	public  BasInterfaceSet selectByPrimaryKey(Object o ,Map<String, Object> paramMap) {
		BasInterfaceSet basInterfaceSet = null;
		if (ToolUtils.isNullOrEmpty(basInterfaceSetDao)) {
			BasInterfaceSetDao basInterfaceDao = (BasInterfaceSetDao) o;
			basInterfaceSet = basInterfaceDao.selectByPrimaryKey(paramMap);
		}else{
			basInterfaceSet = basInterfaceSetDao.selectByPrimaryKey(paramMap);
		}
		return basInterfaceSet;
	}


	@Override
	protected BasInterfaceSet queryTableByKey(String key) {
		// TODO Auto-generated method stub
		return null;
	}

}
